
import request from "@/service/axios/index";

/**@description 页面接口API */
const devApi = {
    /**@description 查询列表 */
    queryList: (data) => {
        return request.post({ url: '/dev/codeGengeration/list', data })
    },
    /**@description 删除 */
    delete: (id) => {
        return request.delete({ url: '/dev/codeGengeration/delete?id=' + id })
    },
    /**@description 保存数据 */
    saveData: (data) => {
        return request.post({ url: "/dev/codeGengeration/save", data })
    },
    /**@description 获取详情 */
    getDetail: (id) => {
        return request.get({ url: "/dev/codeGengeration/detail?id=" + id })
    },
    /**@description 下载代码 */
    download: async (id) => {
        // window.open("http://localhost:6234/dev/codeGengeration/downloadFiles?id=6c0c47ee-8cff-41c6-aa7c-46d412d8e469")
        return await request.download({ url: "/dev/codeGengeration/download?id=" + id, headersType: 'application/zip' });
    }
}
export default devApi;